﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using UnliQ.Service.Contracts;
using UnliQ.ServiceLayer;

namespace UnliQ.Web.Controllers
{
    public class UsersController : UnliQController<IUserService>
    {

        public UsersController(IUserService service)
        {
            this.service = service;
        }

        public UsersController()
        {
            this.service = new UserService();
        }

        public ActionResult Index()
        {
            return View();
        }

        public JsonResult GetUserList()
        { 
            var result = this.service.GetAllUsers();
            return Json(result, JsonRequestBehavior.AllowGet);
        }
    }
}
